home *** CD-ROM | disk | FTP | other *** search
- /*----------- Subtract20.c -------------*/
- /*A sample external function for XDemo.
- by Mark Lankton, 1989 for MacTutor
- */
- #include <types.h>
- #include <resources.h>
- #include <OSUtils.h>
- #include <OSEvents.h>
- #include <SANE.h>
- #include <math.h>
- #include <stdlib.h>
-
- typedef struct XTRABlock{
- int dataLength;
- short *theData;
- }XTRABlock,*XTRABlockPtr,**XTRABlockHandle;
-
- #define TRUE 0xFF;
- #define FALSE 0x00;
-
-
- /************************** prototype *********************/
- pascal Boolean Subtract20(XTRABlock *blockPtr);
-
- /************************** function **********************/
- pascal Boolean
- Subtract20(blockPtr)
- XTRABlock *blockPtr;
- {
- int i;
-
- for(i = 0; i < blockPtr->dataLength;i++)
- {
- *((blockPtr->theData) + i) -= 20;
- }
- return TRUE;
-
- }